﻿<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:BrushCategory="clr-namespace:Samples.BrushCategory"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" x:Class="Samples.BrushCategory.App"
    StartupUri="Window1.xaml" mc:Ignorable="d">
  <Application.Resources>
    <BrushCategory:BrushList x:Key="BrushList"/>
    <DataTemplate x:Key="mydata">

      <Border BorderBrush="White" BorderThickness="1" CornerRadius="5">
        <Border.Background>
          <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            <GradientStop Color="#FF333333" Offset="0"/>
            <GradientStop Color="Gray" Offset="1"/>
          </LinearGradientBrush>
        </Border.Background>
        <StackPanel Margin="5">


          <ListView ItemsSource="{Binding Path=[ObjectBrushes].PropertyValue.Value}">
            <ListView.ItemTemplate>
              <DataTemplate>
                <StackPanel Orientation="Horizontal">
                  <TextBlock Text="{Binding Path=Name}"/>
                  <ComboBox Margin="30,5,5,5" ItemsSource="{Binding Source={StaticResource BrushList}}" SelectedItem="{Binding Path=ObjectBrush}"/>
                  <TextBlock Margin="20,0,0,0" Text="{Binding Path=ObjectBrush}"/>
                </StackPanel>
              </DataTemplate>

            </ListView.ItemTemplate>
          </ListView>

        </StackPanel>
      </Border>

    </DataTemplate>

  </Application.Resources>
</Application>
